﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using CSharpDesign.DAL;
using CSharpDesign.Scripts;

namespace CSharpDesign
{
    public partial class FuKuan : System.Web.UI.Page
    {
        SqlHelper data = new SqlHelper();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

                string sqlstrtprice = "select sum(SPPrice*shuliang) as tprice from DingDan"
                     + " where OrderID='" + Request.QueryString["OrderID"].ToString() + "'";

                SqlDataReader dr = data.GetDataReader(sqlstrtprice);
                if (dr.Read())
                {
                    Label1.Text = dr["tprice"].ToString();
                }
            }

        }
        protected void btnRegister_Click(object sender, EventArgs e)
        {
            data.RunSql("update  dbo.GouWuChe set OrderStite='待发货' where   OrderID='" + Request.QueryString["OrderID"].ToString() + "'");
            Alert.AlertAndRedirect("付款成功等待发货！", "DDFH.aspx");

        }
    }

}